<template>
  <div>
    <z-directory-select
        :data="testData"
        ref="direct"
    ></z-directory-select>

    <div>
      <el-button @click="setData">设置</el-button>
    </div>
    <p>tree 格式</p>
    <RemoteFileViewer file="example/views/tree/data.js"></RemoteFileViewer>
  </div>
</template>

<script>
import testData from './data'
import RemoteFileViewer from "@example/plugins/example/components/RemoteFileViewer";
export default {
  components: {RemoteFileViewer},
  data() {
    return {
      testData
    }
  },
  mounted() {
  },
  methods: {
    setData() {
      let testData = this.testData;
      this.$refs.direct.setChecked([
        testData.children[0].id,
        testData.children[0].children[0].id,
        testData.children[0].children[1].id,
        testData.children[0].children[2].id
      ]);
      console.log('sdsdsds')
    }
  }
}
</script>
